package util;

import parser.Rating;

public class Attributes {
	private String stockName;

	private boolean isReitOrTrust;
	private Rating rating;
	private float targetPrice = -1;
	private int hottness = -1;
	private float engulfingRatio;
	private boolean is3BlackSoldiers;
	private float oversold;
	private boolean isDoji;
	private float hammerRatio;
	private float haramiRatio;
	private float piercingRatio;
	private int supportedTicks;
	private boolean isPriceLowReversed;
	private boolean is2WhiteSoldiers;
	private int valueRank;
	private int volumeRank;
	private int featuresSatisfied;

	public Attributes(String stockName) {
		this.stockName = stockName;
	}
	
	public String getStockName() {
		return stockName;
	}
	public void setStockName(String stockName) {
		this.stockName = stockName;
	}
	public float getEngulfingRatio() {
		return engulfingRatio;
	}
	public void setEngulfingRatio(float engulfingRatio) {
		this.engulfingRatio = engulfingRatio;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}
	public float getHammerRatio() {
		return hammerRatio;
	}
	public void setHammerRatio(float hammerRatio) {
		this.hammerRatio = hammerRatio;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}
	public float getHaramiRatio() {
		return haramiRatio;
	}
	public void setHaramiRatio(float haramiRatio) {
		this.haramiRatio = haramiRatio;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}
	public float getPiercingRatio() {
		return piercingRatio;
	}
	public void setPiercingRatio(float piercingRatio) {
		this.piercingRatio = piercingRatio;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}
	public boolean isPriceLowReversed() {
		return isPriceLowReversed;
	}
	public void setPriceLowReversed() {
		this.isPriceLowReversed = true;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}
	public boolean isIs2WhiteSoldiers() {
		return is2WhiteSoldiers;
	}
	public void setIs2WhiteSoldiers() {
		this.is2WhiteSoldiers = true;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}
	public boolean isIs3BlackSoldiers() {
		return is3BlackSoldiers;
	}
	public void setIs3BlackSoldiers() {
		this.is3BlackSoldiers = true;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}

	public int getSupportedTicks() {
		return supportedTicks;
	}

	public void setSupportedTicks(int supportedTicks) {
		this.supportedTicks = supportedTicks;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}

	public int getValueRank() {
		return valueRank;
	}

	public void setValueRank(int valueRank) {
		this.valueRank = valueRank;
	}

	public int getVolumeRank() {
		return volumeRank;
	}

	public void setVolumeRank(int volumeRank) {
		this.volumeRank = volumeRank;
	}

	public int getFeaturesSatisfied() {
		return featuresSatisfied;
	}

	private void setFeaturesSatisfied(int featuresSatisfied) {
		this.featuresSatisfied = featuresSatisfied;
	}

	public float getTargetPrice() {
		return targetPrice;
	}

	public void setTargetPrice(float targetPrice) {
		this.targetPrice = targetPrice;
	}

	public boolean isDoji() {
		return isDoji;
	}

	public void setDoji(boolean isDoji) {
		this.isDoji = isDoji;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}

	public int getHottness() {
		return hottness;
	}

	public void setHottness(int hottness) {
		this.hottness = hottness;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}

	public float getOversold() {
		return oversold;
	}

	public void setOversold(float oversold) {
		this.oversold = oversold;
		setFeaturesSatisfied(getFeaturesSatisfied() + 1);
	}

	public Rating getRating() {
		return rating;
	}

	public void setRating(Rating rating) {
		this.rating = rating;
	}

	public boolean isReitOrTrust() {
		return isReitOrTrust;
	}

	public void setReitOrTrust(boolean isReitOrTrust) {
		this.isReitOrTrust = isReitOrTrust;
	}
}
